package ut.service;
public class ShortMessage{
	public static boolean sendVerifyCode(String number, String code){
		return ShortMessage.send(number, "請立即在【UT終極一翻】的驗證畫面中輸入以下驗證碼：" + code + "。非常感謝您的使用！");
	}
	private static boolean send(String number, String content){
		String body = "";
		try{
			body = ut.util.HttpClient.sendHttpRequest("https://api.twsms.com/smsSend.php",
			"username=laipaul&password=320184&mobile=" + number + "&message=" + java.net.URLEncoder.encode(content, "utf-8"), true);
		}catch(java.io.UnsupportedEncodingException e){
			return false;
		}
		return (body.indexOf("<code>00000</code>") > -1);
	}
}